/*
 * =====================================================================================
 *
 *       Filename:  LinkedQueue.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  11/11/2012 05:16:26 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Kjeldahl (), 
 *   Organization:  
 *
 * =====================================================================================
 */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>

#define SIZE 100
#define elmType int


typedef struct Linkeddata{
	elmType info[SIZE];
	struct Linkeddata *pior;
	struct Linkeddata *next;
}Linkeddata;

typedef struct{
	int length;
	Linkeddata *front;
	Linkeddata *rear;
}LinkedQueue;

LinkedQueue *initLinkedQueue();
Linkeddata *createdata();
void emptyLinkedQueue(LinkedQueue *Q);
void destroyLinkedQueue(LinkedQueue *Q);
Linkeddata *pop(LinkedQueue *Q);
void  unshift(LinkedQueue *Q,elmType value);
bool isempty(LinkedQueue *Q);
int getLength(LinkedQueue *Q);
Linkeddata *getFront(LinkedQueue *Q);
Linkeddata *getRear(LinkedQueue *Q);










